package com.adams.access.db.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 
 */
@Entity
@Table(name = "T_PARAMETER")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Parameter implements Serializable, java.lang.Cloneable
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 9157487811293519752L;

	private String parameterValue; // 参数值

	private String paramDescription; // 参数描述

	private int isDisplay; // 是否展示

	private ParameterPK parameterPK; // 参数名

	private int version;

	@EmbeddedId
	public ParameterPK getParameterPK()
	{
		return parameterPK;
	}

	public void setParameterPK(ParameterPK parameterPK)
	{
		this.parameterPK = parameterPK;
	}

	@Column(length = 128)
	public String getParameterValue()
	{
		return parameterValue;
	}

	public void setParameterValue(String parameterValue)
	{
		this.parameterValue = parameterValue;
	}

	@Column(length = 250)
	public String getParamDescription()
	{
		return paramDescription;
	}

	public void setParamDescription(String paramDescription)
	{
		this.paramDescription = paramDescription;
	}

	public int getIsDisplay()
	{
		return isDisplay;
	}

	public void setIsDisplay(int isDisplay)
	{
		this.isDisplay = isDisplay;
	}

	@Column(name = "VERSION")
	public int getVersion()
	{
		return version;
	}

	public void setVersion(int version)
	{
		this.version = version;
	}

	@Override
	public String toString()
	{
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}

	@Override
	public boolean equals(Object o)
	{
		return o != null && o.getClass().equals(this.getClass())
				&& EqualsBuilder.reflectionEquals(this, o);
	}
}
